{
  "statement":"select\n  p1.party_id,\n  p3.cust_cn_name,\n  p2.cust_mgr_name,\n  p1.open_acct_org_no,\n  p2.mgmt_org_name,\n  p4.org_no,\n  SUM(p1.cvt_rmb_txn_amt) as cvt_rmb_txn_amt\nfrom\n  tbl_a p1\n  inner join (\n    select\n      party_id\n    from\n      tbl_a p1\n    where\n      p1.debit_crdt_flag = '02'\n      and p1.ETL_DT = \"2023-03-31\"\n    group by\n      1\n    having\n      sum(p1.cvt_rmb_txn_amt) >= 500000\n  ) p5 on p1.party_id = p5.party_id\n  left join tbl_b p2 on p2.cust_mgmt_type_cd = '1'\n  and p1.party_id = p2.lp_org_no \n  and p2.start_dt <= \"2023-03-31\"\n  and p2.end_dt > \"2023-03-31\"\n  left join tbl_c p3 on p1.party_id = p3.party_id\n  and p3.etl_dt = \"2023-03-31\"\n  left join tbl_d p4 on p1.open_acct_org_no = p4.acct_org_no\n  and p4.etl_dt = \"2023-03-31\"\ngroup by\n  1,\n  2,\n  3,\n  4,\n  5,\n  6\norder by\n  p1.party_id\nlimit 0,100;\n",
  "table_meta":{
    "test_db.tbl_a":"CREATE TABLE `tbl_a` (\n  `etl_dt` date NULL COMMENT \"\",\n  `party_id` varchar(240) NULL COMMENT \"\",\n  `debit_crdt_flag` varchar(30) NULL COMMENT \"\",\n  `open_acct_org_no` varchar(60) NULL COMMENT \"\",\n  `cvt_rmb_txn_amt` decimal128(22, 2) NULL COMMENT \"\"\n) ENGINE=OLAP \nDUPLICATE KEY(`etl_dt`, `party_id`)\nDISTRIBUTED BY HASH(`etl_dt`, `party_id`) BUCKETS 1 \nPROPERTIES (\n\"replication_num\" = \"1\",\n\"in_memory\" = \"false\",\n\"enable_persistent_index\" = \"false\",\n\"replicated_storage\" = \"true\",\n\"compression\" = \"LZ4\"\n);",
    "test_db.tbl_b":"CREATE TABLE `tbl_b` (\n  `start_dt` date NULL COMMENT \"\",\n  `end_dt` date NULL COMMENT \"\",\n  `lp_org_no` varchar(90) NULL COMMENT \"\",\n  `cust_mgmt_type_cd` varchar(60) NULL COMMENT \"\",\n  `cust_mgr_name` varchar(90) NULL COMMENT \"\",\n  `mgmt_org_name` varchar(90) NULL COMMENT \"\"\n) ENGINE=OLAP \nDUPLICATE KEY(`start_dt`, `end_dt`, `lp_org_no`)\nDISTRIBUTED BY HASH(`start_dt`, `end_dt`, `cust_mgmt_type_cd`) BUCKETS 50 \nPROPERTIES (\n\"replication_num\" = \"1\",\n\"in_memory\" = \"false\",\n\"enable_persistent_index\" = \"false\",\n\"replicated_storage\" = \"true\",\n\"compression\" = \"LZ4\"\n);",
    "test_db.tbl_c":"CREATE TABLE `tbl_c` (\n  `etl_dt` date NULL COMMENT \"\",\n  `party_id` varchar(240) NULL COMMENT \"\",\n  `cust_cn_name` varchar(900) NULL COMMENT \"\"\n) ENGINE=OLAP \nDUPLICATE KEY(`etl_dt`, `party_id`)\nDISTRIBUTED BY HASH(`etl_dt`, `party_id`) BUCKETS 25 \nPROPERTIES (\n\"replication_num\" = \"1\",\n\"in_memory\" = \"false\",\n\"enable_persistent_index\" = \"false\",\n\"replicated_storage\" = \"true\",\n\"compression\" = \"LZ4\"\n);",
    "test_db.tbl_d":"CREATE TABLE `tbl_d` (\n  `etl_dt` date NULL COMMENT \"\",\n  `org_no` varchar(240) NULL COMMENT \"\",\n  `acct_org_no` varchar(240) NULL COMMENT \"\"\n) ENGINE=OLAP \nDUPLICATE KEY(`etl_dt`, `org_no`)\nDISTRIBUTED BY HASH(`etl_dt`, `org_no`) BUCKETS 1 \nPROPERTIES (\n\"replication_num\" = \"1\",\n\"in_memory\" = \"false\",\n\"enable_persistent_index\" = \"false\",\n\"replicated_storage\" = \"true\",\n\"compression\" = \"LZ4\"\n);",
    "test_db.TEST_MV_1":"CREATE MATERIALIZED VIEW `TEST_MV_1` (`debit_crdt_flag`, `party_id`, `ETL_DT`, `sum_amt`)\nDISTRIBUTED BY HASH(`ETL_DT`, `party_id`) BUCKETS 50 \nREFRESH MANUAL\nPROPERTIES (\n\"replication_num\" = \"1\",\n\"replicated_storage\" = \"true\",\n\"storage_medium\" = \"HDD\",\n\"session.enable_spill\" = \"true\"\n)\nAS SELECT `p1`.`debit_crdt_flag`, `p1`.`party_id`, `p1`.`ETL_DT`, sum(`p1`.`cvt_rmb_txn_amt`) AS `sum_amt`\nFROM `test_db`.`tbl_a` AS `p1`\nGROUP BY 1, 2, 3;",
    "test_db.TEST_MV_2":"CREATE MATERIALIZED VIEW `TEST_MV_2` (`party_id`, `cust_cn_name`, `cust_mgr_name`, `open_acct_org_no`, `mgmt_org_name`, `org_no`, `test_etl_dt`, `cvt_rmb_txn_amt`, `debit_crdt_flag`, `ETL_DT`, `sum_amt`)\nDISTRIBUTED BY HASH(`party_id`) BUCKETS 50 \nREFRESH MANUAL\nPROPERTIES (\n\"replication_num\" = \"1\",\n\"replicated_storage\" = \"true\",\n\"storage_medium\" = \"HDD\",\n\"session.enable_spill\" = \"true\"\n)\nAS SELECT `p1`.`party_id`, `p3`.`cust_cn_name`, `p2`.`cust_mgr_name`, `p1`.`open_acct_org_no`, `p2`.`mgmt_org_name`, `p4`.`org_no`, `p1`.`ETL_DT` AS `test_etl_dt`, `p1`.`cvt_rmb_txn_amt`, `p5`.`debit_crdt_flag`, `p5`.`ETL_DT`, `p5`.`sum_amt`\nFROM `test_db`.`tbl_a` AS `p1` INNER JOIN `test_db`.`TEST_MV_1` AS `p5` ON `p1`.`party_id` = `p5`.`party_id` LEFT OUTER JOIN `test_db`.`tbl_b` AS `p2` ON (((`p2`.`cust_mgmt_type_cd` = '1') AND (`p1`.`party_id` = `p2`.`lp_org_no`)) AND (`p2`.`start_dt` <= '2023-03-31')) AND (`p2`.`end_dt` > '2023-03-31') LEFT OUTER JOIN `test_db`.`tbl_c` AS `p3` ON (`p1`.`party_id` = `p3`.`party_id`) AND (`p3`.`etl_dt` = '2023-03-31') LEFT OUTER JOIN `test_db`.`tbl_d` AS `p4` ON (`p1`.`open_acct_org_no` = `p4`.`acct_org_no`) AND (`p4`.`etl_dt` = '2023-03-31');"
  },
  "table_row_count":{
    "test_db.TEST_MV_1":{
      "TEST_MV_1":1
    },
    "test_db.TEST_MV_2":{
      "TEST_MV_2":3
    },
    "test_db.tbl_a":{
      "tbl_a":3
    }
  },
  "session_variables":"{\"partial_update_mode\":\"auto\",\"cbo_cte_reuse\":true,\"character_set_connection\":\"utf8\",\"cbo_use_correlated_join_estimate\":true,\"enable_insert_strict\":true,\"enable_connector_adaptive_io_tasks\":true,\"tx_isolation\":\"REPEATABLE-READ\",\"enable_hive_metadata_cache_with_insert\":false,\"cbo_cte_reuse_rate_v2\":1.15,\"character_set_results\":\"utf8\",\"query_excluding_mv_names\":\"\",\"enable_rewrite_simple_agg_to_meta_scan\":false,\"enable_adaptive_sink_dop\":true,\"enable_profile\":false,\"load_mem_limit\":0,\"sql_safe_updates\":0,\"runtime_filter_early_return_selectivity\":0.05,\"enable_local_shuffle_agg\":true,\"disable_function_fold_constants\":false,\"select_ratio_threshold\":0.15,\"query_delivery_timeout\":300,\"collation_database\":\"utf8_general_ci\",\"spill_mem_table_size\":104857600,\"new_planner_agg_stage\":0,\"use_compute_nodes\":-1,\"collation_connection\":\"utf8_general_ci\",\"resource_group\":\"\",\"profile_limit_fold\":true,\"spill_operator_max_bytes\":1048576000,\"cbo_max_reorder_node_use_dp\":10,\"enable_hive_column_stats\":true,\"enable_groupby_use_output_alias\":false,\"forward_to_leader\":false,\"count_distinct_column_buckets\":1024,\"query_cache_agg_cardinality_limit\":5000000,\"cboPushDownAggregateMode_v1\":-1,\"window_partition_mode\":1,\"enable_deliver_batch_fragments\":true,\"enable_tablet_internal_parallel_v2\":true,\"interpolate_passthrough\":true,\"enable_incremental_mv\":false,\"SQL_AUTO_IS_NULL\":false,\"event_scheduler\":\"OFF\",\"max_pipeline_dop\":64,\"broadcast_right_table_scale_factor\":10,\"enable_simplify_case_when\":true,\"runtime_join_filter_push_down_limit\":1024000,\"big_query_log_cpu_second_threshold\":480,\"div_precision_increment\":4,\"runtime_adaptive_dop_max_block_rows_per_driver_seq\":16384,\"log_rejected_record_num\":0,\"cbo_push_down_distinct_below_window\":true,\"sql_mode_v2\":32,\"hdfs_backend_selector_scan_range_shuffle\":false,\"pipeline_profile_level\":1,\"parallel_fragment_exec_instance_num\":1,\"max_scan_key_num\":-1,\"net_read_timeout\":60,\"streaming_preaggregation_mode\":\"auto\",\"hive_partition_stats_sample_size\":3000,\"enable_mv_planner\":false,\"profile_timeout\":2,\"cbo_push_down_aggregate\":\"global\",\"spill_encode_level\":7,\"enable_query_dump\":false,\"global_runtime_filter_build_max_size\":67108864,\"enable_rewrite_sum_by_associative_rule\":true,\"query_cache_hot_partition_num\":3,\"enable_prune_complex_types\":true,\"query_cache_type\":0,\"max_parallel_scan_instance_num\":-1,\"query_cache_entry_max_rows\":409600,\"enable_mv_optimizer_trace_log\":false,\"connector_io_tasks_per_scan_operator\":16,\"enable_materialized_view_union_rewrite\":true,\"sql_quote_show_create\":true,\"scan_or_to_union_threshold\":50000000,\"enable_exchange_pass_through\":true,\"runtime_profile_report_interval\":10,\"query_cache_entry_max_bytes\":4194304,\"enable_exchange_perf\":false,\"workgroup_id\":0,\"enable_rewrite_groupingsets_to_union_all\":false,\"transmission_compression_type\":\"NO_COMPRESSION\",\"interactive_timeout\":3600,\"use_page_cache\":true,\"big_query_log_scan_bytes_threshold\":10737418240,\"collation_server\":\"utf8_general_ci\",\"tablet_internal_parallel_mode\":\"auto\",\"enable_pipeline\":true,\"spill_mode\":\"auto\",\"enable_query_debug_trace\":false,\"enable_show_all_variables\":false,\"full_sort_max_buffered_bytes\":16777216,\"wait_timeout\":28800,\"transmission_encode_level\":7,\"query_including_mv_names\":\"\",\"transaction_isolation\":\"REPEATABLE-READ\",\"enable_global_runtime_filter\":true,\"enable_load_profile\":false,\"enable_plan_validation\":true,\"load_transmission_compression_type\":\"NO_COMPRESSION\",\"cbo_enable_low_cardinality_optimize\":true,\"scan_use_query_mem_ratio\":0.3,\"new_planner_optimize_timeout\":3000,\"enable_outer_join_reorder\":true,\"force_schedule_local\":false,\"hudi_mor_force_jni_reader\":false,\"cbo_enable_greedy_join_reorder\":true,\"range_pruner_max_predicate\":100,\"enable_rbo_table_prune\":false,\"spillable_operator_mask\":-1,\"rpc_http_min_size\":2147482624,\"cbo_debug_alive_backend_number\":0,\"global_runtime_filter_probe_min_size\":102400,\"scan_or_to_union_limit\":4,\"enable_cbo_table_prune\":false,\"enable_parallel_merge\":true,\"nested_mv_rewrite_max_level\":3,\"net_write_timeout\":60,\"cbo_prune_shuffle_column_rate\":0.1,\"hash_join_push_down_right_table\":true,\"pipeline_sink_dop\":0,\"broadcast_row_limit\":15000000,\"enable_populate_block_cache\":true,\"exec_mem_limit\":2147483648,\"enable_sort_aggregate\":false,\"query_cache_force_populate\":false,\"runtime_filter_on_exchange_node\":false,\"disable_join_reorder\":false,\"enable_rule_based_materialized_view_rewrite\":true,\"connector_scan_use_query_mem_ratio\":0.3,\"net_buffer_length\":16384,\"cbo_prune_subfield\":true,\"full_sort_max_buffered_rows\":1024000,\"query_timeout\":300,\"connector_io_tasks_slow_io_latency_ms\":50,\"cbo_max_reorder_node\":50,\"enable_distinct_column_bucketization\":false,\"enable_big_query_log\":true,\"analyze_mv\":\"sample\",\"runtime_filter_scan_wait_time\":20,\"enable_sync_materialized_view_rewrite\":true,\"prefer_compute_node\":false,\"enable_strict_type\":false,\"group_concat_max_len\":65535,\"parse_tokens_limit\":3500000,\"chunk_size\":4096,\"global_runtime_filter_probe_min_selectivity\":0.5,\"query_mem_limit\":0,\"enable_filter_unused_columns_in_scan_stage\":true,\"enable_scan_block_cache\":false,\"enable_materialized_view_single_table_view_delta_rewrite\":false,\"auto_increment_increment\":1,\"sql_dialect\":\"StarRocks\",\"big_query_log_scan_rows_threshold\":1000000000,\"character_set_client\":\"utf8\",\"autocommit\":true,\"enable_column_expr_predicate\":true,\"enable_runtime_adaptive_dop\":false,\"cbo_cte_max_limit\":10,\"storage_engine\":\"olap\",\"enable_optimizer_trace_log\":false,\"spill_operator_min_bytes\":10485760,\"cbo_enable_dp_join_reorder\":true,\"tx_visible_wait_timeout\":10,\"enable_materialized_view_view_delta_rewrite\":true,\"cbo_max_reorder_node_use_exhaustive\":4,\"enable_sql_digest\":false,\"spill_mem_table_num\":2,\"enable_spill\":false,\"pipeline_dop\":0,\"single_node_exec_plan\":false,\"full_sort_late_materialization_v2\":true,\"join_implementation_mode_v2\":\"auto\",\"sql_select_limit\":9223372036854775807,\"enable_materialized_view_rewrite\":true,\"statistic_collect_parallel\":1,\"disable_colocate_join\":false,\"max_pushdown_conditions_per_column\":-1,\"default_table_compression\":\"lz4_frame\",\"runtime_adaptive_dop_max_output_amplification_factor\":0,\"innodb_read_only\":true,\"spill_mem_limit_threshold\":0.8,\"cbo_reorder_threshold_use_exhaustive\":6,\"enable_predicate_reorder\":false,\"enable_query_cache\":false,\"mv_rewrite_mode\":\"\",\"max_allowed_packet\":33554432,\"time_zone\":\"Asia/Shanghai\",\"enable_multicolumn_global_runtime_filter\":false,\"character_set_server\":\"utf8\",\"cbo_use_nth_exec_plan\":0,\"io_tasks_per_scan_operator\":4,\"parallel_exchange_instance_num\":-1,\"enable_shared_scan\":false,\"allow_default_partition\":false}",
  "column_statistics":{
    "test_db.tbl_d":{
      "acct_org_no":"[-Infinity, Infinity, 0.0, 1.0, 1.0] UNKNOWN",
      "etl_dt":"[-Infinity, Infinity, 0.0, 1.0, 1.0] UNKNOWN",
      "org_no":"[-Infinity, Infinity, 0.0, 1.0, 1.0] UNKNOWN"
    },
    "test_db.TEST_MV_1":{
      "ETL_DT":"[-Infinity, Infinity, 1.0, 4.0, 1.0] ESTIMATE",
      "sum_amt":"[3.3, 3.3, 0.0, 16.0, 1.0] ESTIMATE",
      "party_id":"[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE",
      "debit_crdt_flag":"[-Infinity, Infinity, 0.0, 1.0, 1.0] ESTIMATE"
    },
    "test_db.TEST_MV_2":{
      "test_etl_dt":"[-Infinity, Infinity, 1.0, 4.0, 1.0] ESTIMATE",
      "ETL_DT":"[-Infinity, Infinity, 1.0, 4.0, 1.0] ESTIMATE",
      "cust_mgr_name":"[-Infinity, Infinity, 1.0, 0.0, 1.0] ESTIMATE",
      "sum_amt":"[3.3, 3.3, 0.0, 16.0, 1.0] ESTIMATE",
      "open_acct_org_no":"[-Infinity, Infinity, 0.0, 0.3333333333333333, 1.0] ESTIMATE",
      "party_id":"[-Infinity, Infinity, 0.0, 0.3333333333333333, 1.0] ESTIMATE",
      "cust_cn_name":"[-Infinity, Infinity, 1.0, 0.0, 1.0] ESTIMATE",
      "org_no":"[-Infinity, Infinity, 1.0, 0.0, 1.0] ESTIMATE",
      "mgmt_org_name":"[-Infinity, Infinity, 1.0, 0.0, 1.0] ESTIMATE",
      "cvt_rmb_txn_amt":"[1.1, 1.1, 0.0, 16.0, 1.0] ESTIMATE",
      "debit_crdt_flag":"[-Infinity, Infinity, 0.0, 0.3333333333333333, 1.0] ESTIMATE"
    },
    "test_db.tbl_c":{
      "party_id":"[-Infinity, Infinity, 0.0, 1.0, 1.0] UNKNOWN",
      "cust_cn_name":"[-Infinity, Infinity, 0.0, 1.0, 1.0] UNKNOWN",
      "etl_dt":"[-Infinity, Infinity, 0.0, 1.0, 1.0] UNKNOWN"
    },
    "test_db.tbl_a":{
      "open_acct_org_no":"[-Infinity, Infinity, 0.0, 1.0, 1.0] UNKNOWN",
      "party_id":"[-Infinity, Infinity, 0.0, 1.0, 1.0] UNKNOWN",
      "etl_dt":"[-Infinity, Infinity, 0.0, 1.0, 1.0] UNKNOWN",
      "debit_crdt_flag":"[-Infinity, Infinity, 0.0, 1.0, 1.0] UNKNOWN",
      "cvt_rmb_txn_amt":"[-Infinity, Infinity, 0.0, 1.0, 1.0] UNKNOWN"
    },
    "test_db.tbl_b":{
      "start_dt":"[-Infinity, Infinity, 0.0, 1.0, 1.0] UNKNOWN",
      "end_dt":"[-Infinity, Infinity, 0.0, 1.0, 1.0] UNKNOWN",
      "cust_mgr_name":"[-Infinity, Infinity, 0.0, 1.0, 1.0] UNKNOWN",
      "lp_org_no":"[-Infinity, Infinity, 0.0, 1.0, 1.0] UNKNOWN",
      "cust_mgmt_type_cd":"[-Infinity, Infinity, 0.0, 1.0, 1.0] UNKNOWN",
      "mgmt_org_name":"[-Infinity, Infinity, 0.0, 1.0, 1.0] UNKNOWN"
    }
  },
  "be_number":1,
  "be_core_stat":{
    "numOfHardwareCoresPerBe":"{\"10005\":104}",
    "cachedAvgNumOfHardwareCores":104
  },
  "exception":[

  ],
  "version":"tpch_mv_1t",
  "commit_version":"f9e2764"
}